package
{
  import flash.system.Security;
  
  import mx.collections.ArrayCollection;
  
  public class YouTubeCoverFlow extends VideoCoverFlow
  {
    
    override public function set dataProvider(_dataProvider:ArrayCollection):void
    {
      for each (var o:Object in _dataProvider)
      {
        var server:String = "http://youtube" + Math.round((Math.random() * 5)) + ".proxy.jamesward.org/";

        o.thumbnail =  server + o.id + ".jpg";
        o.flv = server + o.id + ".flv";
        
        Security.loadPolicyFile(server + "crossdomain.xml");
      }
      
      super.dataProvider = _dataProvider;
    }

  }
}